#include "faultdiagnosis.h"

FaultDiagnosis::FaultDiagnosis(QObject *parent) : QObject(parent)
{

}

FaultDiagnosis::~FaultDiagnosis()
{

}

void FaultDiagnosis::faultDiagnosisResults()
{
    QString result;
    srand(QTime(0,0,0).secsTo(QTime::currentTime()));
    int randomNum = rand() % 5;
    switch (randomNum) {
    case 0:
        result = "A圈故障";
        break;
    case 1:
        result = "B圈故障";
        break;
    case 2:
        result = "C圈故障";
        break;
    case 3:
        result = "D圈故障";
        break;
    case 4:
        result = "E圈故障";
        break;
    }
    emit faultDiagnosisFinished(result);
}
